#include <iostream>
#include <queue>
#include <cmath>
#include <iomanip>
using namespace std;
int N;
priority_queue<double> q;
void solve();
int main() {
    cin >> N;
    double w;
    while (N--) {
        cin >> w;
        q.push(w);
    }
    solve();
}

void solve() {
    while (q.size() > 1) {
        double x1 = q.top(); q.pop();
        double x2 = q.top(); q.pop();
        double res = 2 * sqrt(x1 * x2);
        q.push(res);
    }
    cout << setiosflags(ios::fixed) << setprecision(3) << q.top() << endl;
}